#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QTimer>
#include <QGraphicsScene>
#include <QLabel>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
     void send_data(QString str);

     void add_Circles();
     void add_Rects();
     void add_Polygon();
     void add_Text();
     void protocal_handle(QByteArray recBuf);
     int  seqNum=0;



private slots:
    void on_connect_btn_clicked();
    void serialPortRead_Slot();
    void on_mouseMovePoint(QPoint point); //鼠标移动
    void on_mouseClicked(QPoint point); //鼠标单击
    void on_mouseDoubleClick(QPoint point); //鼠标双击
    void on_keyPress(QKeyEvent *event); //按键




private:
    Ui::MainWindow *ui;
    QLabel *Protocal_Version;
    QSerialPort *mySerialPort;
    QGraphicsScene  *scene;

};

#endif // MAINWINDOW_H
